{% load helpers %}

<strong>{{ body_content_table_verbose_name_plural|bettertitle }}</strong>
{% if body_content_table_list_url %}
    <a href="{{ body_content_table_list_url }}" class="badge bg-primary">
        {% if badge_count_override is not none %}
            {{ badge_count_override }}
        {% else %}
            {{ body_content_table.rows|length }}
        {% endif %}
    </a>
{% elif body_content_table or badge_count_override is not none %}
    <span class="badge bg-secondary">
        {% if badge_count_override is not none %}
            {{ badge_count_override }}
        {% else %}
            {{ body_content_table.rows|length }}
        {% endif %}
    </span>
{% endif %}
